package entity;

/**
 * 道具抽象类
 */
public abstract class Prop extends FlyingObject {
    protected boolean alive = true; // 是否存活
    protected int speed = 3; // 下落速度
    
    @Override
    public void move() {
        y += speed;
    }
    
    @Override
    public boolean isOutOfBounds(int panelWidth, int panelHeight) {
        return y > panelHeight;
    }
    
    @Override
    public boolean isAlive() {
        return alive;
    }
    
    public void setAlive(boolean alive) {
        this.alive = alive;
    }
}